#!/bin/bash
#@ 上报脚本例子
django_user="admin"
django_pass="admin"
tmpfile=$(mktemp)
cat >$tmpfile <<EOF
{
  "reportData": "\n[\n  {\n    'id' : '1',\n    'host' : '127.0.0.1'\n  }\n]\n"
}
EOF
curl -X PUT -u "$django_user:$django_pass" -d "@$tmpfile" -H "Content-Type: application/json" http://127.0.0.1:9090/api/HtmlConfig/7/
rm -rf $tmpfile
